翻訳と辞書
Words near each other
・ Delec Locomotive Depot
・ Delec Platform railway station
・ Delecroix
・ Delectable
・ Delectable soft-furred mouse
・ Delectosaurus
・ Deledda
・ Deledda International School
・ Delegación de Asociaciones Israelitas Argentinas
・ Delegan
・ Delegan-e Madrasah
・ Delegan-e Molla Faqir
・ Delegan-e Sheykh Cheragh
・ Delegata potestas non potest delegari
・ Delegate
Delegate (CLI)
・ Delegate (disambiguation)
・ Delegate model of representation
・ Delegate River
・ Delegate River Diversion Tunnel
・ Delegate, New South Wales
・ Delegated administration
・ Delegated authority
・ Delegated Legislation Committee
・ Delegated legislation in the United Kingdom
・ Delegated Path Discovery
・ Delegated Path Validation
・ Delegated powers (UK Planning)
・ Delegated Powers and Regulatory Reform Select Committee
・ Delegation


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Delegate (CLI) : ウィキペディア英語版
Delegate (CLI)
A delegate is a form of type-safe function pointer used by the Common Language Infrastructure (CLI). Delegates specify a method to call and optionally an object to call the method on. Delegates are used, among other things, to implement callbacks and event listeners. A delegate object encapsulates a reference to a method. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.
== C# code example ==
Code to declare a delegate type, named SendMessageDelegate, which takes a Message as a parameter and returns void:

delegate void SendMessageDelegate(Message message);

Code to define a method which takes an instantiated delegate as its argument:

void SendMessage(SendMessageDelegate sendMessageDelegateReference)

The implemented method which runs when the delegate is called:

void HandleSendMessage(Message message)

Code to call the SendMessage method, passing an instantiated delegate as an argument:

SendMessage(new SendMessageDelegate(HandleSendMessage));


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Delegate (CLI)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.